import { USER_INFO } from '../actioins/actionsTypes';

const initState = {
  name: "zjj"
};

const setUser = (state, action)=>{
  return { ...state, name: action.obj.name };
};


const UserReducer = (state = initState, action) => {
    switch(action.type) {
        case USER_INFO: 
          return setUser(state, action);
        default: return state;
    }
};

export default UserReducer;
